package com.javer.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.javer.dao.KeyValDao;
import com.javer.domain.KeyVal;
import com.javer.domain.PageView;

@Service
public class KeyValService {
	@Autowired private KeyValDao keyValDao;
	
	public PageView<KeyVal> getByPage(PageView<KeyVal> pv) {
		pv.setTableName("keyval");
		return keyValDao.getByPage(pv);
	}
	
	public PageView<KeyVal> getPageByKeyword(PageView<KeyVal> pv, String keyword) {
		return keyValDao.getPageByKeyword(pv, keyword);
	}
	
	public KeyVal getById(int id) {
		return keyValDao.getById(id);
	}
	
	public List<KeyVal> getByKeyword(String keyword) {
		return keyValDao.getByKey(keyword);
	}
}
